[ExecuTorch][WebGPU] Test: rms_norm workgroup size is runtime-configurable#20956
Open
JCNTH wants to merge 2 commits into
Open
[ExecuTorch][WebGPU] Test: rms_norm workgroup size is runtime-configurable#20956JCNTH wants to merge 2 commits into
JCNTH wants to merge 2 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20956
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 0caed86 with merge base e500fee ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Jul 15, 2026
This PR needs a
|
JCNTH
added a commit
that referenced
this pull request
Jul 15, 2026
…rable Pull Request resolved: #20956 Add a native gtest that locks the wg-size configurability guarantee: the same rms_norm WGSL, run at override `wg_size` 64 and 128, must produce the same output. `Module::forward` always uses the handler-clamped size (64), so the test builds the compute pipeline directly and sets `wg_size` via a `WGPUConstantEntry`, mirroring the runtime pipeline setup + `WebGPUGraph::copy_outputs` readback. Key changes: - `test/test_webgpu_native.cpp` — `run_rms_norm_at_wg()` standalone-pipeline helper + `RmsNormWorkgroupSizeConfigurable` test (element-wise agree within abs 1e-4 / rel 1e-3, plus a non-zero sanity guard). Self-contained (no `.pte`/export), so it runs inside `webgpu_native_test` under `test_webgpu_native_ci.sh` with no new wiring. Absolute rms_norm correctness stays covered by the model-driven golden tests; this adds the "128 matches 64" guarantee. Co-authored-with: Claude Code. ghstack-source-id: 403097259 @exported-using-ghexport Differential Revision: [D112060302](https://our.internmc.facebook.com/intern/diff/D112060302/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Add a native gtest that locks the wg-size configurability guarantee: the same rms_norm WGSL, run at override
wg_size64 and 128, must produce the same output.Module::forwardalways uses the handler-clamped size (64), so the test builds the compute pipeline directly and setswg_sizevia aWGPUConstantEntry, mirroring the runtime pipeline setup +WebGPUGraph::copy_outputsreadback.Key changes:
test/test_webgpu_native.cpp—run_rms_norm_at_wg()standalone-pipeline helper +RmsNormWorkgroupSizeConfigurabletest (element-wise agree within abs 1e-4 / rel 1e-3, plus a non-zero sanity guard).Self-contained (no
.pte/export), so it runs insidewebgpu_native_testundertest_webgpu_native_ci.shwith no new wiring. Absolute rms_norm correctness stays covered by the model-driven golden tests; this adds the "128 matches 64" guarantee.Co-authored-with: Claude Code.
@exported-using-ghexport
Differential Revision: D112060302
Differential Revision: D112060302